
SnipeHud v1.2

Written by Tim "Zear" Hammock (zear@planetstarsiege.com)
April 6 - 13, 1999

    Thanks to Cowboy for the crosshair code snippet - genius
    Thanks to DS.Poker for the basis for my zoom-setting-chain-thingy
    Thanks to Presto for most of the 1.01 changes
    Thanks to the 1.1 beta testers for the many corrections and suggestions

==============================================================================

Contents:

I.   Installation
II.  Settings
III. Version history

==============================================================================

I. Installation:
----------------
    
 ****************************************************************************
 *                                                                          *
 *   Note: This script _requires_ the Presto Pack version 0.93 or better.   *
 *                                                                          *
 ****************************************************************************

1. If you don't already have one, create a '<tribes>\config\zear' folder.

2. Unzip SnipeHud.cs into the 'zear' folder.

3. In your <tribes>\config\autoexec.cs file, anywhere after the line

        exec("presto\\autoexec.cs");
        
   add the line
   
        Include("zear\\SnipeHud.cs");

4. Customize the settings as explained in section II, Settings, below.

5. (Re)start Tribes.

==============================================================================

II.  Settings:
--------------


-> Position and size:

These are set via the variable $SnipeHud::position on line 44. The string
assigned to $SnipeHud::position follows the format

    "x y width height"

with x indicating the distance from the left edge of the screen, and y
indicating the distance from the top edge of the screen. If you play Tribes in
a window, these measurements will of course be from the appropriate edge of
the Tribes window.

The position and size can be set either relative to the size of the screen, or
by exact pixel measurement. For instance, the default setting is

    $SnipeHud::position = "100% 100% 30% 30%";
    
This default setting uses relative measurement. The x value of 100% indicates
that the SnipeHud should be placed all the way to the right edge of the
screen. The y value of 100% indicates that the SnipeHud should be placed all
the way to the bottom edge of the screen. The width and height values indicate
that the hud should be 30% as wide as the screen and 30% as high as the screen
as well.

Using relative placement, the SnipeHud could be placed in the middle of the
screen using

    $SnipeHud::position = "50% 50% 30% 30%";
    
To use exact pixel measurements, simply omit the '%' symbols. For instance

    $SnipeHud::position = "400 240 240 240";
    
would place the SnipeHud's upper left corner 400 pixels across and 240 pixels
down from the screen's upper left corner, and will give the SnipeHud a size of
240x240. This would place a rather large view in the bottom-right corner of a
640x480 screen.

Keep in mind that relative placement will adjust for screen size automatically,
whereas exact pixel placement will not.

                                 ------------
                                 

-> Zoom on/off toggle:

To set the key that will toggle the SnipeHud on and off, set
$SnipeHud::zoomToggle on line 47 equal to the desired key. The default key is
the semicolon (';').

When you turn on the SnipeHud, the zoom level should be where you left it at
last use (unless you have not used it before, in which case it will default to
the lowest available zoom setting - see 'Zoom step settings').

See the sections on 'Initial-on', and 'Momentary Zoom' below for more
information.

                                 ------------
                                 

-> Sensitivity on/off toggle:

To set the key that will toggle custom mouse sensitivity on and off, set
$SnipeHud::sensitivity on line 50 equal to the desired key. The default key is
the 'l' (lowercase 'L').

You cannot toggle the custom mouse sensitivity on when the SnipeHud is not
visible.

See the sections on 'Active/Passive sensitivity' and 'Zoom step settings'
below for more information.

                                 ------------
                                 

-> Zoom-in and zoom out keys:

To set the keys that will zoom in or out one step, set $SnipeHud::zoomInKey
and $SnipeHud::zoomOutKey (on lines 53 and 55 respectively) equal to the
desired keys. The default key for zoom-in is the period ('.'), and the default
for zoom-out is the comma (',').

You can increase or decrease the zoom while the SnipeHud is not visible, but
doing so will no longer automatically activate the SnipeHud as in previous
versions.

See the sections on 'Active/Passive sensitivity' and 'Zoom step settings'
below for more information.

                                 ------------
                                 

-> Initial-on:

SnipeHud can be set up to automatically activate when you start Tribes.

To set SnipeHud to automatically activate, set line 57 to

    $SnipeHud::initialOn = true;

To disable this feature, set line 57 to

    $SnipeHud::initialOn = false;

                                 ------------
                                 

-> Active/Passive sensitivity:

SnipeHud alters your mouse sensitivity based on the current zoom level. The
sensitivity is limited to Tribes' sensitivity range, which defaults to values
between 0.0002 (most sensitive) and 0.004. If you flip your mouse's X or Y
axis, SnipeHud will take that into account automatically.

There are two modes of sensitivity: active and passive.

Active sensitivity means that the mouse sensitivity is adjusted automatically
when the SnipeHud is active, and can be changed to the default sensitivity by
pressing and holding the sensitivity on/off toggle key.

Passive sensitivity means that the mouse sensitivity is adjusted only
when the sensitivity on/off toggle key is pressed and held.

To set SnipeHud to active sensitivity, set line 60 to

    $SnipeHud::passiveSense = false;

To set SnipeHud to passive sensitivity, set line 60 to

    $SnipeHud::passiveSense = true;

See the section on 'Zoom step settings' below for more information.

                                 ------------
                                 

-> Momentary Zoom:

SnipeHud's Zoom on/off can be activated one of two ways: toggle or momentary.

In toggle mode, pressing the zoom on/off button will activate SnipeHud and
pressing it again will deactivate SnipeHud.

In momentary mode, pressing the zoom on/off button will activate SnipeHud and
releasing it will deactivate SnipeHud.

To set SnipeHud to toggle mode, set line 63 to

    $SnipeHud::momentary = false;

To set SnipeHud to momentary mode, set line 63 to

                                 ------------
                                 

-> Zoom step settings:

For each zoom setting beginning with line 66) there is a line:

    $SnipeHud::set[<zoom>] = "<out> <in> <sens>";

where:

    <zoom> is the zoom factor
    <out> is the next less powerful zoom factor
    <in> is the next more powerful zoom factor
    <sens> is the mouse sensitivity for this zoom factor

An 'x' in the place of <out> or <in> indicates the end of the chain (can't
zoom in/out any farther). You may set as many zoon steps as you like. The
default settings are

    $SnipeHud::set[2] = "x 5 0.003";
    $SnipeHud::set[5] = "2 10 0.002";
    $SnipeHud::set[10] = "5 20 0.001";
    $SnipeHud::set[20] = "10 x 0.0005";
    
If you wish the zoom to automatically wrap through the zoom list, you could
change this to

    $SnipeHud::set[2] = "20 5 0.003";
    $SnipeHud::set[5] = "2 10 0.002";
    $SnipeHud::set[10] = "5 20 0.001";
    $SnipeHud::set[20] = "10 2 0.0005";
    
and then zooming in farther than 20x will set the zoom to 2x and vice-versa.

    
==============================================================================

III. Version History:
---------------------

New in version 1.2 (4/9/99):
    $SnipeHud::position (hud placement) uses newest Presto style
    Zoom level indicator
    Added banner for main menu screen
    Added passive/active toggle for sensitivity
    Added momentary/static toggle
    Mouse x-axis flipping also handled automatically

New in version 1.1 (4/9/99 - No public release):
    REQUIRES Presto Pack v0.93 or better
    Crosshair location calculation now works always (thanks Cowboy)
    Mouse y-axis flipping handled automatically (thanks Presto)
    Default mouse sensitivity handled automatically (thanks Presto)

New in version 1.01 (4/8/99):
    Mouse y-axis flipped playstyle supported
    Presto cleaned it up and added relative placement
    Presto also found and fixed a bug in my Presto-ization
        that resulted in multiple view objects being created

New in version 1.0 (4/7/99):
    Mouse sensitivity implemented
    Crosshair
    Window border
    Fixed a 'Doh!' style bug in keybinding
